/*
 * NegativePredicate.java
 * 
 * Created on Jun 8, 2007, 11:45:09 PM
 * 
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.infomancers.collections.predicates;

import com.infomancers.collections.Predicate;

/**
 *
 * @author aviadbd
 */
public class NegativePredicate<T> implements Predicate<T> {

    private Predicate<T> predicate;
    
    public NegativePredicate(Predicate<T> predicate) {
        this.predicate = predicate;
    }

    public boolean isTrue(T item) {
        return !predicate.isTrue(item);
    }
}
